There are lots of different ways to raise money for a cause. Below are a couple of different ways. Read all of them and choose based on what will be easiest and most productive for you depending on location, time, and other factors.
Publicize. Put up posters in places that have been okayed for you to do that. Send out flyers. Make announcements at lunch, assembly/meetings, or other available times. Try to make your posters and/or announcements different from others, and be sure to tell people why it'll be worthwhile to come.
When publicizing for your fundraiser, say exactly what you're raising money for. Is it for raising awareness on the environment? or cleaning up the oceans? People will be more likely to donate money if they know exactly where it's going.
Find a period of time between a week and two weeks that's just an average period of time with as little extra things happening during it. Don't schedule your drive during another person's drive. You'll need to go to your principal/boss to talk about good dates.
Try to make a competition out of it, between grades, houses/teams, departments, or against a local record (usually found online). Maybe you can try to beat the biggest donation the organization you're donating to has ever gotten. It can be anything, just make sure you publicize it.
The first day of the drive, set up at least two collection boxes in areas that everyone or almost everyone passes daily.
Keep publicizing it while it's going on. Update people on the running total and tell them how far they have to go.
Find a time and a place where a large group of people will be at a given time (lunch at your school/workplace, for example).
Find people to help you with baking or manning the station.
Publicize your bake sale and the cause you're raising money for. Posters and announcements are particularly helpful here.
Bake the goods! Try to make unique things, especially if there's a bake sale every day where you're doing it.
Create your own unique website with customizable templates.