CiviMail Mailing List opt-in checkboxes?
Yes.  You can add "Groups" as a field to a CiviCRM Profile.  There's similar functionality available on Webform.

If you use profiles, only groups with the Visibility setting of "Public Pages" will be available for the petition signer to click.  If you use Webform, you can modify the widget to show a specific set of groups for that webform.

Note that the profile implementation has a limitation - if someone a) fills in a profile that has the "Groups" field, b) is already in your database, c) is already a member of one of the public groups, and d) does not check off the box for that group, they will be REMOVED from the group.

If that last part is a problem, and you're up for writing a custom extension, you can see a quick and dirty implementation I wrote to handle this exact scenario on Github.