Sorry but your question is really too general to answer.
I'm sure some brave person will rush in where I fear to tread, but this is a complex issue: you need to go and look at an English grammar book to find all the cases. There are lots of exceptions and funny rules and overlapping cases and context dependent cases and so on and so on. You could quite easily use all three:
My mother is on the shopping centre
= e.g. My mother is standing on top of the roof of the shopping centre
My mother is at the shopping centre
= e.g. My mother has gone shopping and I am at home
My mother is in the shopping centre
= e.g. I am standing outside the shopping centre waiting for my mother.
There isn't going to be a quick way to match up propositions. There are some general rules that fit a majority of the cases but the exceptions abound.
Unfortunately, changing prepositions around will have drastic effects on its meaning. Instead of trying to catch and explain all cases, I have decided to simply use your examples and explain what they mean:
I worked on a project
"On" is typical here and will be correct most of the time. Working on a project implies doing work related to the project and is similar to working on a house or working on a letter. You are performing an action (working) on an object (the project).
The tricky side of "on" comes with phrases like, "I worked on a farm." Working "on a farm" means doing work while located on a farm instead of working on the object of a farm.
A good test is to try replacing "worked on" with "completed": "I completed a project" or "I completed a house" sound fine while "I completed a farm" drastically changes its meaning.
I worked in a project
Working "in" something is more akin to being located inside of the object. "I worked in a building." A "project" can certainly contain things and so you can technically work "in" a project.
When I was at the university I studied math
Here, "at" is mostly referring to your physical location. You did work while being located at the university. This generally refers to students enrolled in the university but also applies to people who were just visiting or possibly working there in a way unrelated to learning (such as the janitor.)
When I was in the university I studied math
Again, "in" here implies being "inside of" or "contained by" the university. To say, "I am in university" generally means to be enrolled in one of the university's programs. Unfortunately, it can also mean being physically inside of the university buildings... so I am not helping much.
The most common case is to say, "When I was at..." but there is a mix of things happening here. People will ask you "Where do you go to school?" The importance seems to fall on the physical location but this usage does not cover strange exceptions such as enrolling in classes over the internet where you never move from your chair but are considered "at" a particular university.
In any case, I hope this helped somewhat.
Best Answer
Yes and no. I'd agree that the preposition in would normally be the better word to use, particularly when an activity happens inside the city limits. However, that's not hard-and-fast, and I don't quite like the inflexibility of the rule as you stated it: 'in' has to be used for cities.
For example, the word at can sometimes be used to mean "near", as in,
The word at might also be used when talking about a momentous event, where the city is considered a meeting place:
In the case of:
I read that as:
which sounds just fine to me.
When the use of a preposition doesn't match a rule of thumb you've been taught, chances are that the word is simply being used in a way that's not quite so ordinary – not that the "wrong word" has been used.
Ah, prepositions! Those two- and three-letter words can often be much more flexible than we sometimes initially realize.