Firstly I need to dispel a few myths regarding sulphur and eggs. The yellow
colour of eggs does NOT come from sulphur, neither the pure element (which
is indeed yellow) nor even sulphur-containing compounds, as these are mostly
colourless.

Rather, the yellow colour comes from a family of molecules, xanthophylls,
molecules similar to that (carotene) which gives carrots their orange
colour. As animals, in this case the hen, do not make xanthophylls, the
yellow colour of eggs comes from what the mother hen eats.

So, where does the sulfur that gives rotten eggs their characteristic smell
come from? Eggs, both egg white and egg yolk, contain considerable amounts
of protein. Two of the constituent amino acids of proteins, methionine and
cysteine, contain sulphur. When the hen makes an egg, proteins from the
mother hen are used to make the proteins of the egg. There are a number of
other non-protein sulphur-containing compounds in eggs, but these are
present in very small amounts. The bulk of sulphur in eggs is incorporated
in proteins.

When microorganisms invade an egg, the breakdown of egg proteins releases
hydrogen sulphide, giving the characteristic smell of rotten eggs. Hydrogen
sulphide is an extremely smelly (and very toxic) molecule, so very small
quantities are easily detected by our noses.