I am creating epub using sigil. Every book has almost (if not all) same elements: Headings, paragraphs, images, tables, quotes, boxes, notes, footnotes, references, bibliography etc. I don't have a good sense of design. So I was wondering if there are any free or opensource stylesheets or templates that one could use?
Paul Salvette wrote an ebook formatting guide which I recommend. He wrote boilerplate css which you can view/download here: http://bbebooksthailand.com/bb-CSS-boilerplate.html
His company has produced some epub3 files which you can download for free. http://bbebooksthailand.com/samples.html (You can inspect them by changing the .epub file extension to .zip and then unzipping). I haven't looked at them yet (I just found them when I started to answer your question), but they should be good guides -- especially because the code epub3 compliant.
Here are some other things to think about:
Most publishers use the epub file as input to generate a kindle file, so there are usually conditional Kindle adjustments to make. Some use a separate kindle css file, while others just combine everything into one generic file.
You can open and inspect css any epub file which is not protected from DRM. That means you can view code from Oreilly Books or Smashwords. Another option is to download any recent Project Gutenberg title. I recently published a title Soldier Boys by Jack Matthews on smashwords which has some up-to-date templates.
I just uploaded my css for Soldier Boys:
Some notes about my file: Last update was April 2016 not 2013 as I said on the top. I used some default values from a docbook style sheet at the top which would not be relevant to anyone. Also, I did some hocus pocus to make images into chapter titles, so you can ignore the any css classes marked "image-replace-title" or p.pseudo-title. (Also I figured out some Kindle-friendly image css which I detailed here). The cool stuff about my css is my list of breakpoints (which take into account different devices but don't use any kindle-specific media queries). There's no footnotes, boxes or references, but my ebook did have a bibliography. Important: I included a reference to an embedded font -- which you must delete (I think epubcheck won't validate with a bad font reference).