The differences are slight, but I will try to explain them the best I can as I understand them.
に - emphasizes the location. Imagine this particle as if it is an arrow pointing to a particular location.
駅の前に友達に会います。
I will meet my friend AT the station.
で - emphasizes an action taking place at a given location or event.
駅の前で友達に会います。
I will MEET my friend at the station.
The structure of the sentence doesn't really change, but the change of particle simply changes the focus and in some cases one particle may be preferable to the other. Here are some other examples.
図書館で本を読みます。
I will read a book at the library.
学校に毎日行きます。
I go to school everyday.
To reiterate, に points toward a particular location, while で shows that an action is happening in a given location or event. I feel like if the action happening is not a verb that implies motion (such as 行く、会う、来る、etc.), then で may be more appropriate.
This are just some of my impressions of how these particles are used. I think a native speaker could confirm or expand upon the points that I've made. Let me know if this is clear or if you have any other questions, please ask.