May one “write” happy Birthday on a cake on Shabbos forming the letters with sour sticks?
No. Although this form of writing is clearly temporary in nature, it is nonetheless prohibited on Shabbos.
Sources: See Shulchan Aruch 340:4 and Mishnah Berurah. See also Be’er Moshe, vol. 6, no. 92, discussing letters written in cream, which he writes may not be broken on Shabbos.