What's the difference between 在 and 于 as a preposition?
王得屹's answer is basically correct, 在 is used in colloquial sentences more and 于 is used in literary sentences more. 

I would provide examples to illustrate the point more clearly:

"生(于)中国" = "出生(在)中国" (we don't say 生在中国 because 生 is more literary, 在 is more colloquial, mixing the two make it sound unnatural)

"逝(于)日本" = "(在)日本逝世" (we don't say 逝在日本 because 逝 is more literary, 在 is more colloquial, mixing the two make it sound unnatural; meanwhile, 死 and 在 in 死在日本 are both colloquial terms)

"生于中国" and "逝于日本" are more literary

"出生在中国" and "在日本逝世" / 死在日本 are more colloquial

unlike 逝, 逝世 is more suitable for colloquial sentences