Different publishers want it different ways. In the books I have done for Scholatic, they want it approximately where it comes in the text as follows (set off by double the spacing of the text)
[BEGIN SIDEBAR]
Title
Sidebar text
[END SIDEBAR]
Diagrams and tables were indicated the same way, with a notation about whether it was okay to break the diagram or table across a page.
But I just got a chapter back from Lucent where the editor crossed out all the sidebars in the text and said to put sidebars, diagrams, and photo suggestions at the end of the chapter and that she would decide where it was appropriate to put them. So my guess is that either way is okay. I prefer way #1 because I feel it gives the sidebars and other illustrative material a better chance to be intergrated appropriately into
the text. So long as it is clear that the material belongs in a sidebar, It isn't going to make or break your chances of getting the book published, and if you are already under contract, you can always ask the editor.