I believe you can leave it unquoted if it's alphanumeric, as long as it doesn't contain ", ', `, =, <, or >.
From the HTML spec:
Attributes are placed inside the start tag, and consist of a name and a value, separated by an "=" character. The attribute value can remain unquoted if it doesn't contain space characters or any of " ' ` = < or >. Otherwise, it has to be quoted using either single or double quotes. The value, along with the "=" character, can be omitted altogether if the value is the empty string.
For consistency I prefer double quotes. No point in using them only sometimes - that makes for messy and less readable code.