Revealing the location of the secret garden requires a level of trust on Mary's part because she is afraid someone may forbid her to go there if they find out (hence why it's a secret garden!). Telling Colin means that she trusts him not to tell anyone.